
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>综合查询</title>
        

<meta http-equiv="X-UA-Compatible" content="IE=edge"/>

<script>
    var contextPath = '/epcwebsite';//不要删除
</script>
<!--淘宝菜单样式-->
<!-- <link href="http://10.88.107.251/epcwebsite/jslib/nav/menu-base.css" rel="stylesheet" media="screen">
<link href="http://10.88.107.251/epcwebsite/jslib/nav/menu.css" rel="stylesheet" media="screen">


<link id="easyuiTheme" rel="stylesheet" type="text/css"  href="http://10.88.107.251/javascript/jeasyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css"  href="http://10.88.107.251/javascript/jeasyui/themes/icon.css" />

<link rel="stylesheet" href="http://10.88.107.251/epcwebsite/jslib/jquery-easyui-portal/portal.css" type="text/css">

<script type="text/javascript" src="http://10.88.107.251/javascript/jeasyui/jquery.min.js"></script>

<script type="text/javascript" src="http://10.88.107.251/javascript/jeasyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="http://10.88.107.251/javascript/jeasyui/locale/easyui-lang-zh_CN.js"></script>

<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/rflib.js" charset="utf-8"></script>
<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/rfmp.js" charset="utf-8"></script>

<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/easyuiDecorate/decorate-easyui-tag.js" charset="utf-8"></script>

<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/jquery-easyui-portal/jquery.portal.js" charset="utf-8"></script>

<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/nav/menu-base.js" charset="utf-8"></script>
<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/nav/menu.js" charset="utf-8"></script>

<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/extJquery.js" charset="utf-8"></script>

<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/extEasyUI.js" charset="utf-8"></script>


<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/datagrid-groupview.js" charset="utf-8"></script>
<script type="text/javascript" src="http://10.88.107.251/javascript/jeasyui/datagrid-detailview.js" charset="utf-8"></script>
<script type="text/javascript" src="http://10.88.107.251/javascript/jeasyui/jquery.edatagrid.js" charset="utf-8"></script>


<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/common.js" charset="utf-8"></script>
<script type="text/javascript" src="http://10.88.107.251/javascript/highcharts/highcharts.js"></script>
<script type="text/javascript" src="http://10.88.107.251/javascript/highcharts/highcharts-more.js"></script>
<script type="text/javascript" src="http://10.88.107.251/javascript/highcharts/modules/exporting.js"></script>
<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/lang.js" charset="utf-8"></script>


<link rel="stylesheet" href="http://10.88.107.251/epcwebsite/jslib/ymcalendar.css" type="text/css">
<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/jquery.ymcalendar.js" charset="utf-8"></script>
<script type="text/javascript" src="http://10.88.107.251/epcwebsite/jslib/jquery.validate.js" charset="utf-8"></script>
 -->





 
        <script src="js/jquery-latest.min.js" type="text/javascript"></script>
        <script src="js/search/jquery.autocomplete.min.js" type="text/javascript"></script>
        <script src="js/search/autoComplete.js" type="text/javascript"></script>
        <link href="js/search/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
        <link href="js/search/MainStyle.css" rel="stylesheet" type="text/css" />
        <link href="js/search/SmallBaiDu.css" rel="stylesheet" type="text/css" />
         
        <script type="text/javascript">
        	
        
            var menuId=0;
            var contentId=1;
            var a1_div='';
            var epc_div='';
            var sysType='';
            
            function sousuo(){
                var name='';
                var id=$('.lbnSelected_Small')[0].id;
                if(id=='tj_all'){
                    name='全部';
                }
                else if(id=='tj_news'){
                    name='文档';
                }
                else if(id=='tj_tieba'){
                    name='图件';
                }
                else if(id=='tj_zhidao'){
                    name='表格';
                }
                else if(id=='tj_mp3'){
                    name='生产动态数据';
                }
                //document.location.href="SearchInfo.jsp?name="+name+"&value="+$('#kw1').val()+sysType; 
                //document.location.href="http://www.baidu.com/s?ie=UTF-8&wd="+$('#searchText').val();
                window.open("http://www.baidu.com/s?ie=UTF-8&wd="+$('#searchText').val());
            }
            
            function sousuo1(title){
                //document.location.href= searchIp + "SearchInfo.jsp?name=全部&value="+title+sysType;
                document.location.href= "";
            }
            
            function divFunction(title){
                return '<div class=\"div1\"><a href="javascript:void(0);" onclick=\"sousuo1(\''+title+'\');\">' + title + '</a></div>';
            }
            
            var searchIp = 'http://10.88.107.249:8888';
            
            function getBaiduRequestParam(a){
            	var qsData = { 'wd': a, 'p': '3', 'cb': 'getData', 't': new Date().getMilliseconds().toString() };
            	return qsData;
            }
            
            $().ready(function (){
            	
            	$('#keyword').autocomplete({
            		source: function( request, response ) {
            	        $.ajax({
            	          url: "http://gd.geobytes.com/AutoCompleteCity",
            	          dataType: "jsonp",
            	          data: {
            	            q: request.term
            	          },
            	          success: function( data ) {
            	            response( data );
            	          }
            	        });
            	      },
            	      minLength: 1,
            	      select: function( event, ui ) {
            	        console.log( ui.item ?
            	          "Selected: " + ui.item.label :
            	          "Nothing selected, input was " + this.value);
            	      },
            	      open: function() {
            	        $( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
            	      },
            	      close: function() {
            	        $( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
            	      }
            	});
            	
            	
                /*获取图标地址*/
                /* $.ajax({
                    url: 'http://10.88.107.251/jsvc/service/systemConfig/getSystemConfigValue?categary=A1&key=SmallBaiDu',
                    dataType: 'json',
                    success: function(data) {
                         //document.getElementById('img').src=data.value;
                    }
                }); */
                
                /*
                $.ajax({
                    async: false,
                    url: 'http://10.88.107.251/jsvc/service/systemConfig/getSystemConfigValue?categary=A1&key=searchIp',
                    dataType: 'json',
                    success: function(data) {
                        searchIp = data.value;
                    }
                });*/
                
                 var qs = (location.search.length > 0 ? location.search.substring(1) : ""),
                        args = {},
                        items = qs.length ? qs.split("&") : [],
                        item = null,
                        name = null,
                        value = null,
                        i = 0,
                        len = items.length;
                        
                for (i = 0; i < len; i++) {
                    item = items[i].split('=');
                    name = decodeURIComponent(item[0]);
                    value = decodeURIComponent(item[1]);
                    if (name.length) {
                        args[name] = value;
                    }
                }
                if(args.sysType!=undefined){
                    sysType='&sysType='+args.sysType;
                }
                
                $("#kw1").autocomplete(searchIp+"/AutoCompleteHandler.ashx", {
                    width: 412,
                    minChars: 2,
                    selectFirst: false,
                    matchContains: true,
                    dataType: "jsonp",
                    parse: function (data){
                        return $.map(data, function (row)
                        {
                            return {
                                data: row,
                                value: row.strText,
                                result: row.strText
                            }
                        });
                    },
                    formatItem: function (row, i, max){
                      
                        var item = "<table id='auto" + i + "' class='jsonpTable'><tr><td align='left'>" + row.strText + "</td><td align='right' class='jsonptd'>约" + row.intNum + "个结果</td></tr></table>";
                        return item;
                    },
                    formatResult: function (row){
                        return row.strText;
                    }
                });
                /*我的搜索*/
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getUserSearchHistory.json?type=1',
                    url:'js/search/1.json',
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                        var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div1").append(app);
                    }
                });
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getUserSearchHistory.json?type=2',
                    url:'js/search/2.json',		
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                        var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div4").append(app);
                    }
                });
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getUserSearchHistory.json?type=3',
                    url:'js/search/3.json',			
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                        var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div7").append(app);
                    }
                });
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getUserSearchHistory.json?type=4', 
                    url:'js/search/4.json',	 
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                        var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div10").append(app);
                    }
                });
                /*推荐搜索*/
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getAllUserSearchHistory.json?type=1', 
                    url: 'js/search/a1.json', 
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                        var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div2").append(app);
                    }
                });
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getAllUserSearchHistory.json?type=2',
                    url: 'js/search/a2.json', 
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                         var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div5").append(app);
                    }
                });
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getAllUserSearchHistory.json?type=3',
                    url: 'js/search/a3.json',
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                         var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div8").append(app);
                    }
                });
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_taskConfig/getAllUserSearchHistory.json?type=4',
                    url: 'js/search/a4.json',
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                         var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].title); 
                        }
                        $("#div11").append(app);
                    }
                });
                
                $.ajax({
                    type: 'get', 
                    //url: 'http://10.88.107.251/jsvc/service/A1_dataStatisBusiness/getNewWellList.json',
                    url: 'js/search/b.json',
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                         var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(data[i].WELL_COMMON_NAME); 
                        }
                        $("#div3").append(app);
                    }
                });
            });
            
            
            /*选取url中指定的值detail绑定到divId中进行显示*/
            function ajaxGetSearchData(url, title, divId, detail){
            	$.ajax({
                    type: 'get', 
                    url: url,
                    dataType: "json",
                    success: function(data){
                    	data = data.result;
                        var app = '';
                        for (var i = 0; i < data.length; i++) {
                            app += divFunction(eval('data[i].' + detail)); 
                        }
                        $("#" + divId).append(app);
                    }
                });
            }
            
            
            function baiduSearch(a){
            	//cb直接返回的结果值
            	var qsData = { 'wd': a, 'p': '3', 'cb': 'getData', 't': new Date().getMilliseconds().toString() };
            	
                $.ajax({
                     async: false,
                     url: "http://suggestion.baidu.com/su",
                     type: "GET",
                     dataType: 'jsonp',
                     jsonp: 'jsoncallback',
                     data: qsData,
                     timeout: 5000,
                     success: function (json) {
                    	 console.log(json);
                     },
                     error: function (xhr) {
                    	 
                     }
               });
            }
            
            function getData(data) {
                var Info = data['s'];  //获取异步数据
            }
            
            function tj(id){
                $('#tj_all').removeClass('lbnSelected_Small');
                $('#tj_news').removeClass('lbnSelected_Small');
                $('#tj_tieba').removeClass('lbnSelected_Small');
                $('#tj_zhidao').removeClass('lbnSelected_Small');
                $('#tj_mp3').removeClass('lbnSelected_Small');
                $('#'+id).addClass('lbnSelected_Small');
            }
            function menusClick(id){
                for(var i=1;i<5;i++){ 
                    if(id==i){
                        $('#a'+i).addClass('current');
                        menuId=i-1;
                    }
                    else{
                        $('#a'+i).removeClass('current');
                    }
                }
                if(id==1){
                     $("#content3").html("推荐新井");
                }
                else if (id==2){
                    $("#content3").html("推荐新工区");
                }
                else if(id==3){
                    $("#content3").html("&nbsp;");
                    if(contentId==3){
                        contentClick(1);
                        return;
                    }
                }
                else if(id==4){
                    $("#content3").html("&nbsp;");
                    if(contentId==3){
                        contentClick(1);
                        return;
                    }
                }
                divContent(menuId,contentId);
            }
            /*我的搜索和推荐搜索  事件*/
            function contentClick(id){
                for(var i=1;i<4;i++){ 
                    if(id==i){
                        $('#content'+i).addClass('tab-on');
                        contentId=i;
                    }
                    else{
                        $('#content'+i).removeClass('tab-on');
                    }
                }
                
                divContent(menuId,contentId);
            }
            function divContent(x,y){
                
                var id=x*3+y;
                for(var i=1;i<12;i++){
                    if(i==id){
                        $('#div'+i).fadeIn();
                    }  
                    else{
                        $('#div'+i).css({display: "none"});
                    }
                        
                }
                
            }
            /*新井  标签*/
            function newWellClick(){
                for(var i=1;i<9;i++){ 
                    $('#div'+i).css({display: "none"});
                }
                $('#divNewWell').css({display: "block"});
                for(var i=1;i<3;i++){
                    $('#content'+i).removeClass('tab-on');                 
                }
                $('#contentNewWell').addClass('tab-on');
                contentId=3;
            }
        </script>
        
    </head>
    <body>
        <div id="wrapper" style="display: block;">
            <div style="display: block;" id="content">
                <div id="m">
                    <p id="lg">
                        <img id="img" src="js/search/search2.png">
                    </p>
                    <p id="nv">
                        <a id="tj_all" href="javascript:void(0);" class="lbnSelected_Small" onclick="tj('tj_all');" style="margin-right: 10px;">全&nbsp;部</a> 
                        <a id="tj_news" href="javascript:void(0);" onclick="tj('tj_news');">文&nbsp;档</a>　
                        <a id="tj_tieba" href="javascript:void(0);" onclick="tj('tj_tieba');">图&nbsp;件</a>　
                        <a id="tj_zhidao" href="javascript:void(0);" onclick="tj('tj_zhidao');">表&nbsp;格</a>　
						<!--<a id="tj_mp3" href="javascript:void(0);" onclick="tj('tj_mp3');">生产动态数据</a>　-->
                    </p>
                    <div id="fm">
                            <div class="fm">
                                <span class="bg s_ipt_wr">
                                	<input id="searchText" maxlength="100" class="s_ipt"/>
                                    <!-- <input autocomplete="on" name="wd" id="kw1" maxlength="100" class="s_ipt" type="text" onkeydown='if(event.keyCode==13){sousuo();}' > -->
                                    <!-- <input name="wd" id="kw2" maxlength="100" class="s_ipt" type="text" onkeydown='baiduSearch(this.value)' > -->
                                </span>
                                <div id="auto" style="display: block;position:absolute;background-color: white;"></div> 
                                <span class="bg s_btn_wr">
                                    <input value="搜索一下" id="su1" class="bg s_btn"  type="submit" onclick="sousuo();">
                                </span>
                             </div>
                    </div>
                </div>
                <div id="s_wrap" >
                    <div id="s_main" class="main clearfix">
                        
                        <div id="s_ctner_menus"style="background:#838383;width:80px;height:280px;float: left;">
                            <div>
                                <a class="s-menu s-opacity-menu1 current" hidefocus="" onclick="menusClick(1)" href="#" id="a1">井</a>
                            </div>
                            <div>
                                <a class="s-menu s-opacity-menu1" hidefocus="" onclick="menusClick(2)" href="#"  id="a2">工区</a>
                            </div>
                            <div>
                                <a class="s-menu s-opacity-menu1" hidefocus="" onclick="menusClick(3)" href="#"  id="a3">文档</a>
                            </div>
                            <div>
                                <a class="s-menu s-opacity-menu1" hidefocus="" onclick="menusClick(4)" href="#" id="a4">数据</a>
                            </div>
                        </div>
                        <div id="s_ctner_contents"  style=" float: left;width:810px; height: 280px;background:#F5F5F5;margin-left:10px;">
                            <div id="s_nall_tabs" class="s-nall-tabs s-opacity-border1-bottom">
                                <a class="tab-on"  onclick="contentClick(1)" href="#" id="content1">我的搜索</a>
                                <a class=""  onclick="contentClick(2)" href="#" id="content2">推荐搜索</a>
                                <a class=""  onclick="contentClick(3)" href="#" id="content3">推荐新井</a>
								<!-- <a class=""  onclick="newSiteClick()" href="#" id="contentNewSite" style="display: none;">推荐新工区</a>-->
                            </div>
                             
                            <div id="div1" style=" padding: 0px 15px;">
                                
                            </div>
                            <div id="div2" style=" display: none; padding: 0px 15px;">
                                 
                            </div>
                            <div id="div4" style=" display: none; padding: 0px 15px;">
                                
                            </div>
                            <div  id="div5" style=" display: none; padding: 0px 15px;">
                                 
                            </div>
                            <div  id="div7" style=" display: none; padding: 0px 15px;">
                                
                            </div>
                            <div  id="div8" style=" display: none; padding: 0px 15px;">
                                 
                            </div>
                            <div id="div10" style=" display: none; padding: 0px 15px;">
                                 
                            </div>
                            <div id="div11" style=" display: none; padding: 0px 15px;">
                                 
                            </div>
                            <div id="div3" style=" display: none;">
                            
                            </div>
                            <div id="div6" style=" display: none;">
                            
                            </div>
                        </div>            
                    </div>              
                            
                </div>
            </div> 
        </div>
</body>
</html>
